package cn.wildfirechat.app;


import cn.wildfirechat.app.jpa.FavoriteItem;
import cn.wildfirechat.app.pojo.*;
import cn.wildfirechat.pojos.InputCreateDevice;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

public interface Service {
    RestResult sendResetCode(String email);
    RestResult loginWithEmailCode(HttpServletResponse response, String email, String code, String clientId, int platform);
    RestResult emailLoginWithPassword(HttpServletResponse response, String email, String password, String clientId, int platform);

    RestResult changePassword(String oldPwd, String newPwd);
    RestResult resetPassword(String mobile, String resetCode, String newPwd);
    RestResult sendDestroyCode();
    RestResult destroy(HttpServletResponse response, String code);

    RestResult loginWithSession(String token);

    RestResult changeName(String newName);
    RestResult complain(String text);

    RestResult putGroupAnnouncement(GroupAnnouncementPojo request);
    RestResult getGroupAnnouncement(String groupId);

    RestResult saveUserLogs(String userId, MultipartFile file);

    RestResult addDevice(InputCreateDevice createDevice);
    RestResult getDeviceList();
    RestResult delDevice(InputCreateDevice createDevice);

    RestResult sendUserMessage(SendMessageRequest request);
    RestResult uploadMedia(int mediaType, MultipartFile file);

    RestResult putFavoriteItem(FavoriteItem request);
    RestResult removeFavoriteItems(long id);
    RestResult getFavoriteItems(long id, int count);
    RestResult getGroupMembersForPortrait(String groupId);

    RestResult sendEmailLoginCode(String email);

    RestResult loginWithGoogle(HttpServletResponse response, String email, String displayName, String idToken, String clientId, int platform, String accountPhotoUrl);

    RestResult sendForgotPwd(String email);

    RestResult forgotPwd(String email, String resetCode, String newPassword);
}
